function setCookie(n,v) {
    var d=new Date();
    d=new Date(d.getTime() + (34*86400*1000));
    document.cookie=n + '=' + v + '; expires=' + d.toGMTString();
}
function getCookie(n) {
    var c=document.cookie;
    var offset=c.indexOf(n+"=");
    if(offset<0) {
        return 0;
    }
    else{
	c=c.split(";");
	for(var i = 0;i<c.length;i++){
		if(c[i].search(n)!=-1){
			var tht = c[i].replace(n+"=","");
			break;
		}
	}
	return tht;
    }
}